package appx.craft.droid.ui;

import java.util.ArrayList;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;
import appx.craft.droid.R;
import appx.craft.droid.bean.MessageBean;
import appx.craft.droid.uc.MessageAdapater;

public class Activity_2145_screen extends Activity  {
	
	private ListView listview_items;
	private MessageAdapater mMessageListAdapter;
	private ArrayList<MessageBean> mArrayListMessageList;
	private MessageBean mTempMessge;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_2145_screen);
		mArrayListMessageList = new ArrayList<MessageBean>();
		
		/**
		 * For dynamically add new item just remove below static entry then add your value in above 
		 * mArrayListMessageList
		 */
		mTempMessge = new MessageBean();
		mTempMessge.setStrUserName("Tim Chong");
		mTempMessge.setStrMessage("Max one");
		mTempMessge.setStrTimeStemp("25 Feb 2013 11:38 PM");
		
		mArrayListMessageList.add(mTempMessge);
		
		mTempMessge = new MessageBean();
		mTempMessge.setStrUserName("Tim Chong");
		mTempMessge.setStrMessage("Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two Max  Two");
		mTempMessge.setStrTimeStemp("25 Feb 2013 11:38 PM");
		
		mArrayListMessageList.add(mTempMessge);
		
		mTempMessge = new MessageBean();
		mTempMessge.setStrUserName("Tim Chong");
		mTempMessge.setStrMessage("Toooo");
		mTempMessge.setStrTimeStemp("25 Feb 2013 11:38 PM");
		
		mArrayListMessageList.add(mTempMessge);
		
		mTempMessge = new MessageBean();
		mTempMessge.setStrUserName("Tim Chong Max  Two");
		mTempMessge.setStrMessage("Max  Two Max  Two Max  Two");
		mTempMessge.setStrTimeStemp("25 Feb 2013 11:38 PM");
		
		mArrayListMessageList.add(mTempMessge);
		
		listview_items = (ListView)findViewById(R.id.listview_items);
		
		mMessageListAdapter = new MessageAdapater(Activity_2145_screen.this);
		
		listview_items.setAdapter(mMessageListAdapter);
		
		mMessageListAdapter.addMessages(mArrayListMessageList);
		
		
	}
	
	@Override
	protected void onStart() {
		super.onStart();
	}
	
	@Override
	protected void onPause() {
		super.onPause();
	}
	
	@Override
	protected void onResume() {
		super.onResume();
	}
	
	@Override
	protected void onDestroy() {
		super.onDestroy();
	}

	
}
